<?php

namespace api\app\controller;

use api\app\model\ButtonsModel;
use cmf\controller\RestBaseController;
use think\facade\Db;

class ButtonsController extends RestBaseController
{
    // 小按钮
    public function buttons()
    {
        $list = Db::name("buttons")->select();
        $this->success('小按钮',$list);
    }

    // 小按钮显示
    public function indexButtons()
    {
        $result = ButtonsModel::select();
        if ($result) {
            return success('查询成功', $result);
        } else {
            return error('查询失败');
        }
    }
}